﻿using LuShanTea.Service.Entities;
using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LuShanTea.Service.ModelConfig
{
    public class AdminUserConfig : EntityTypeConfiguration<AdminUser>
    {
        public AdminUserConfig()
        {
            this.ToTable("T_AdminUsers");

            Property(a => a.Name).HasMaxLength(32);
            Property(a => a.NickName).IsRequired().HasMaxLength(32);
            Property(a => a.PhoneNumber).IsRequired().HasMaxLength(16).IsUnicode(false);
            Property(a => a.Email).IsRequired().HasMaxLength(64);
            Property(a => a.HashPwd).IsRequired().HasMaxLength(128).IsUnicode(false);
            Property(a => a.Salt).IsRequired().HasMaxLength(16);
            Property(a => a.ImgSrc).HasMaxLength(512);
            
        }
    }
}
